package edu.calvin.djs32.cs214.interpreters.drivers;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.tree.CommonTreeNodeStream;
import org.antlr.runtime.tree.Tree;

import edu.calvin.djs32.cs214.interpreters.frontend.Hobbes2008FrontEnd;
import edu.calvin.djs32.cs214.interpreters.frontend.Hobbes2008TIRBuilder;
import edu.calvin.djs32.cs214.interpreters.size.Size;

public class SizeCLIDriver{

	/**
	 * @param args
	 * @throws IOException 
	 * @throws RecognitionException 
	 * @throws IOException 
	 * @throws RecognitionException 
	 */
	public static void main(String[] args) throws RecognitionException, IOException{
		Tree process = new Hobbes2008FrontEnd().process(new ANTLRFileStream("size.hob"));
		Size mySize = new Size();	
		System.out.println("Reading from \"size.hob\"...");
		System.out.println("The height of the file is :" + new Hobbes2008TIRBuilder(new CommonTreeNodeStream(process))
        .expression().accept(mySize));
	}
}
